import request from '@/utils/request'

// 查询黑名单列表列表
export function listBackList(query) {
  return request({
    url: '/organization/backList/list',
    method: 'get',
    params: query
  })
}

// 查询黑名单列表详细
export function getBackList(id) {
  return request({
    url: '/organization/backList/' + id,
    method: 'get'
  })
}

// 新增黑名单列表
export function addBackList(data) {
  return request({
    url: '/organization/backList',
    method: 'post',
    data: data
  })
}

// 修改黑名单列表
export function updateBackList(data) {
  return request({
    url: '/organization/backList',
    method: 'put',
    data: data
  })
}

// 删除黑名单列表
export function delBackList(id) {
  return request({
    url: '/organization/backList/' + id,
    method: 'delete'
  })
}
export function changeBackListStatus(id, status) {
    const data = {
        id,
        status
    }
    return request({
        url: '/organization/backList/changeStatus',
        method: 'put',
        data: data
    })
}
